import request from '@/utils/request'

// 查询所属商户列表
export function douyinMerchant(query) {
    return request({
        url: '/common/v1/douyin/merchant',
        method: 'get',
        params: query
    })
}
// 查询类目
export function douyinCategory(query) {
    return request({
        url: '/common/v1/douyin/category',
        method: 'get',
        params: query
    })
}
// 查询适用门店
export function douyinPoi(query) {
    return request({
        url: '/common/v1/douyin/poi',
        method: 'get',
        params: query
    })
}
// 保存抖音团购套餐
export function saveTradeGoods(data) {
    return request({
        url: '/anchor/trade/goods',
        method: 'POST',
        data
    })
}
// 保存抖音团购套餐草稿
export function saveTradeGoodsDraft(data) {
    return request({
        url: '/anchor/trade/goods/draft',
        method: 'POST',
        data
    })
}
// 查询抖音团购套餐配置详情
export function goodsDetail(id) {
    return request({
        url: '/anchor/trade/goods/detail/' + id,
        method: 'get',
    })
}
// 编辑商品抖音团购配置
export function editGoods(data) {
    return request({
        url: '/anchor/trade/goods',
        method: 'put',
        data
    })
}
// 编辑抖音团购配置草稿
export function editGoodsDraft(data) {
    return request({
        url: '/anchor/trade/goods/draft',
        method: 'put',
        data
    })
}